package com.daka.dao;

import com.daka.entity.Group;
import com.daka.entity.Volunteer;
import com.daka.mybatis.SQLMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author beliveli on 2016/3/31 0031.
 */
@Repository(value = "groupMapper")
@SQLMapper
public interface GroupMapper {

    Group selectById(int id);

    List<Volunteer> selectVolById(int id);

    List<Group> selectByOrg(@Param("onePass") String onePass);

    List<Group> selectPageByOrg(@Param("onePass") String onePass, @Param("groupName") String groupName, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);

    int selectCountByOrg(@Param("onePass") String onePass, @Param("groupName") String groupName);

    List<Volunteer> selectVolPageById(@Param("groupId") Integer groupId, @Param("userName") String groupName, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);

    int selectVolCountById(@Param("groupId") Integer groupId, @Param("userName") String groupName);

    List<Group> selectAll();

    int updatePlatform(@Param("platform") Integer platform, @Param("id") Integer id, @Param("onePass") String onePass);
}
